package com.ny.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection = "device")  // 与插入语句的集合名一致
public class DeviceNew {
    @Id
    private String id;
    private String deviceNo;
    private String name;
    private String type;
    private String status;
    private String factory;

    // getter/setter
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }
    public String getDeviceNo() { return deviceNo; }
    public void setDeviceNo(String deviceNo) { this.deviceNo = deviceNo; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getType() { return type; }
    public void setType(String type) { this.type = type; }
    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }
    public String getFactory() { return factory; }
    public void setFactory(String factory) { this.factory = factory; }

    @Override
    public String toString() {
        return "DeviceNew{" +
                "id='" + id + '\'' +
                ", deviceNo='" + deviceNo + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", status='" + status + '\'' +
                ", factory='" + factory + '\'' +
                '}';
    }
}